# coding: utf-8

__author__ = 'weixin.yuan'

# 抢票订单填写页
elements = {
    '填写抢票信息title': ('name', '填写抢票信息'),
    '抢票须知': ('name', '抢票须知'),
    '云抢票功能说明': ('text', '云抢票功能说明'),
    '指定车次': ('name', '指定车次 建议多选 多选 '),
    '出发日期': ('name', '出发日期 建议多选 多选 '),
    '今天': ('name', '今天'),
    '优选席座': ('name', '优选席座 建议多选 多选 '),
    '选择车次': ('xpath', "//XCUIElementTypeApplication[1]/XCUIElementTypeWindow[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[5]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeScrollView[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]"),
    '确定': ('name', '确定'),
    '座位列表': [
        # ('nameContains', ' 硬卧 ¥'),
        # ('nameContains', ' 软卧 ¥'),
        # ('nameContains', ' 高级软卧 ¥'),
        # ('nameContains', ' 硬座 ¥"'),
        # ('nameContains', ' 二等座 ¥'),
        # ('nameContains', ' 一等座 ¥'),
        # ('nameContains', ' 无座 ¥'),
        # ('nameContains', ' 商务座 ¥'),
        ('xpath', '//XCUIElementTypeApplication[1]/XCUIElementTypeWindow[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther[2]/XCUIElementTypeScrollView[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]')
    ],
    '添加乘客': ('name', ' 添加乘客'),
    '添加儿童': ('name', ' 添加儿童'),
    '账号本人': ('name', '账号本人'),
    '确定添加乘客': ('name', '确定'),
    # '确定添加乘客': ('description', '已选择1位乘客确定'),
    '选择联系人': ('name', ""),
    # '联系人': ('name', '袁维鑫 手机号 +86 137****4624 身份证 23****17'),
    '联系人': ('xpath', '//XCUIElementTypeApplication[1]/XCUIElementTypeWindow[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[5]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther[4]/XCUIElementTypeScrollView[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[3]/XCUIElementTypeOther[1]'),
    '下一步': ('name', '下一步'),
    '抢票成功率估算title': ('name', '抢票成功率估算'),
    # '极速抢票': ('predicate', 'name LIKE "极速抢票 +.*元/份 成功率.*%"'),
    '极速抢票': ('xpath', '//XCUIElementTypeApplication[1]/XCUIElementTypeWindow[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[5]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]'),
    # '快速抢票': ('predicate', 'name LIKE "快速抢票 +.*元/份 成功率.*%"'),
    '不需要': ('name', '不需要'),
    '订单支付title': ('name', '订单支付'),
}
